from aip import AipSpeech
APP_ID = '14636839'
API_KEY = 'u34cdKCsR61tzM0r20Qnp3YM'
SECRET_KEY='Rehs5G02EqbrRDDgGdPY9NKY2ZlCX8Oq'

client = AipSpeech(APP_ID, API_KEY, SECRET_KEY)

result  = client.synthesis('主人,我来了,请吩咐', 'zh', 1, {
    'vol': 5,
})
filename="1122"
if not isinstance(result, dict):
    with open('./'+filename+'.mp3', 'wb') as f:
        f.write(result)